<?php
namespace Home\Controller;
use Think\Controller;
class SysController extends Controller {

    public function aboutus(){
		$url = userState();
        if ($url != false) {
            $this->success('',$url);
        }
        $this->display();
    }

    public function notice() {
		$url = userState();
        if ($url != false) {
            $this->success('',$url);
        }
        $this->display();
    }

    public function noticeinfo() {
		$url = userState();
        if ($url != false) {
            $this->success('',$url);
        }
        $this->display();
    }

    public function getnoticelist() {
		$url = userState();
        if ($url != false) {
            $this->success('',$url);
        }
        $pageNo = $_POST['page'];
        $pageSize = $_POST['pageSize'];

        $model = M('SysNotice');
        $list = $model->order('datetime desc')->page($pageNo, $pageSize)->select();
        $totals = $model->count("id");

        $ajaxdata['success'] = 1;
        $ajaxdata['list'] = $list;
        $ajaxdata['totals'] = $totals;
        $this->ajaxReturn($ajaxdata);
    }
}